-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(OLD) Add cargo-auditable config option. #1516
Conversation
61136ea
to
c684c8c
Compare
c684c8c
to
a501da3
Compare
Co-authored-by: Amos Wenger <[email protected]>
a501da3
to
c0759ff
Compare
Since our main build environment is GitHub Actions at the moment, and it appears cargo auditable isn't preinstalled there, we should also make sure we handle installing it before doing local builds if it's in use. That'd be more impactful for our users than just telling them they need to install it. (We should also do that for non-CI builds though!) |
cargo-auditable uses dist and so we can rely on their installers for our generated workflows and locally https://github.com/rust-secure-code/cargo-auditable/releases/tag/v0.6.4 |
I suppose then we should also consider: do we install a floating "whatever's latest" version? Or do we pick a known-good version and update it periodically? |
@mistydemeo yeah it's a good question- i could see us going either way re pin latest or pick a known good release- both of those options beg the question of a config to override version which seems prudent, because we'll likely need it either way |
@Shnatsel do you have thoughts on how we handle the version of cargo-auditable we install for folks? |
ea891cc
to
aa196ca
Compare
aa196ca
to
e0d13f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed checking for if there are no cargo workspaces - you can handle that by checking the DistGraphBuilder.workspaces
property, which has a list of all workspaces. Each of those has a WorkspaceKind
you can key off of. You can see us using that here in DistGraphBuilder::compute_build_steps
:
cargo-dist/cargo-dist/src/tasks.rs
Lines 2435 to 2448 in d8ec1f9
fn compute_build_steps(&mut self) -> DistResult<()> { | |
// FIXME: more intelligently schedule these in a proper graph? | |
let mut local_build_steps = vec![]; | |
let mut global_build_steps = vec![]; | |
for workspace_idx in self.workspaces.all_workspace_indices() { | |
let workspace_kind = self.workspaces.workspace(workspace_idx).kind; | |
let builds = match workspace_kind { | |
axoproject::WorkspaceKind::Javascript => self.compute_generic_builds(workspace_idx), | |
axoproject::WorkspaceKind::Generic => self.compute_generic_builds(workspace_idx), | |
axoproject::WorkspaceKind::Rust => self.compute_cargo_builds(workspace_idx)?, | |
}; | |
local_build_steps.extend(builds); |
self.inner
on DistGraphBuilder
is DistGraph
, so you've got access to the config there. It's probably good for us to handle this stuff early, so when we're computing the builds - or something similar early in the dist graph construction process - is probably a good place for us to check and potentially error out.
@ashleygwilliams I treat the CLI as the public API for semver purposes, so installing the latest version in 0.6.x series is a safe bet. That should get you bug fixes without any kind of breakage (unless I mess up really badly). You can revisit this if/when I ship 0.7.x, which right now is not even on the horizon. |
8b8d193
to
0cb5667
Compare
edb9d42
to
e4ade7f
Compare
Moving to #1528 because of branch naming making it harder to test. |
Moved to #1528 because the slash in the
duckinator/auditable-builds
branch name is incompatible with testing dist from a GitHub branch.deferred:
complete:
cargo auditable build
instead ofcargo build
ifcargo-auditable=true
cargo-auditable=true